package com.example.hzq.zqb.fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.example.hzq.zqb.R;
import com.example.hzq.zqb.activity.FqzsActivity;

import com.example.hzq.zqb.activity.LoginActivity;
import com.example.hzq.zqb.activity.MakemoneyActivity;

import static com.example.hzq.zqb.activity.MainActivity.loginflag;


/**
 * Created by hzq on 2017/7/14.
 */

public class Fragment3 extends Fragment implements View.OnClickListener{
    private LinearLayout zyb,fqzs,myaim,zkfl;
    private View view;
    private Context context;
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view=inflater.inflate(R.layout.fragment3,container,false);
        context=getActivity();
        zyb=(LinearLayout)view.findViewById(R.id.zyb);
        fqzs=(LinearLayout)view.findViewById(R.id.fqzs);
        myaim=(LinearLayout)view.findViewById(R.id.wdmb);
        zkfl=(LinearLayout)view.findViewById(R.id.zkfl);
        zyb.setOnClickListener(this);
        fqzs.setOnClickListener(this);
        zkfl.setOnClickListener(this);
        myaim.setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.zyb:
                context.startActivity(new Intent(context, MakemoneyActivity.class));
                break;
            case R.id.fqzs:
                context.startActivity(new Intent(context, FqzsActivity.class));
                break;
            case R.id.wdmb:
                Toast.makeText(context,"没数据，不想写布局1",Toast.LENGTH_SHORT).show();
                break;
            case R.id.zkfl:
                Toast.makeText(context,"没数据，不想写布局2",Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
